package model;
/*数据库表模板类*/
public class Info {
    private int id;
    private int price;
    private int status;
    private int org;
    private String name;


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getOrg() {
        if(org==1)
            return "公司a";
        else
            return "公司b";
    }

    public int getOrgNum(){return org;}

    public void setOrg(int org) {
        this.org = org;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "Info{" +
                "id=" + id +
                ", price=" + price +
                ", status=" + status +
                ", org=" + org +
                ", name='" + name + '\'' +
                '}';
    }
    public String toJson(int amount){
        return "{" +"\""+
                "id\":\"" + id +
                "\",\"amount\":\"" + amount +
                "\",\"price\":\"" + price + "\""+
                '}';
    }
}
